cmake_minimum_required(VERSION 3.0)
project(Calibration)

# 查找 OpenCV 包
find_package(OpenCV REQUIRED)

# 查找 yaml-cpp 包
link_directories(/usr/local/lib) # 指定库文件搜索路径
include_directories(/usr/local/include) # 指定头文件搜索路径，

# 包含头文件目录
include_directories(${OpenCV_INCLUDE_DIRS})
#include_directories(${YAMLCPP_INCLUDE_DIR})

# 定义源文件变量
set(SOURCE_FILES
    main.cpp
    calibration.cpp
    undistort.cpp
)

# 定义可执行文件
add_executable(Calibration ${SOURCE_FILES})

# 链接 OpenCV 库
target_link_libraries(Calibration ${OpenCV_LIBS})

# 链接 yaml-cpp 库
target_link_libraries(Calibration yaml-cpp )

# 如果 yaml-cpp 需要额外的链接库，也可以在这里指定
# target_link_libraries(Calibration ${YAMLCPP_EXTRA_LIBRARIES})